package 结构型模式.适配器模式.对象适配器;

import 结构型模式.适配器模式.类适配器.TFCardImpl;

public class Client {
    public static void main(String[] args) {
        Computer computer=new Computer();
        //读取SD卡中的数据
        String msg=computer.readSD(new SDCardImpl());
        System.out.println(msg);

        System.out.println("___________________");
        //使用该电脑读取TF卡中的数据
        //创建适配器类对象
        SDAdaptTF sdAdaptTF=new SDAdaptTF(new TFCardImpl());
        String msg1=computer.readSD(sdAdaptTF);
        System.out.println(msg1);
    }
}
